﻿using UnityEngine;
using UnityEditor;

namespace CWM.Skinn
{
    public static partial class SkinnContextCommands
    {
        [CtxMenuItem("SkinnedMeshRenderer/Bones/Edit Transforms",
            "Inspect and or adjust the bones of a skinned mesh renderer. " +
            "Does not require any changes to the shared mesh.",
            ContextRequirements.SingleItem, 0)]
        public static void SkinnedMeshRendererShowBoneWizard()
        {
            var contextGameObject = SkinnContext.GetContextItem();
            var context = contextGameObject.GetComponent<SkinnedMeshRenderer>();
            if (SkinnEx.IsNullOrNotInAScene(context)) return;
            SkinnBoneArrayWizard.ShowBoneWizard(context);
            SkinnContext.Finished();
        }
    }
}